package com.shigen.file.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shigen.file.entity.SecondMenu;
import com.shigen.file.mapper.SecondMenuMapper;
import com.shigen.file.service.ISecondMenuService;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 二级菜单项 服务实现类
 * </p>
 *
 * @author shigen.fu
 * @since 2022-06-04
 */
@Service
public class SecondMenuServiceImpl extends ServiceImpl<SecondMenuMapper, SecondMenu> implements ISecondMenuService {

  @Override
  public List<SecondMenu> getMenusByParentId(Integer parentId) {
    return getBaseMapper().selectList(lambdaQuery().eq(parentId!= null, SecondMenu::getpId, parentId).getWrapper());
  }
}
